//@author A0096466N
//
// **********
//
// empties the txt store, the vector store and the currently displayed
//
// **********

#include "Reset.h"

Reset::Reset(void) {

}

Reset::~Reset(void) {

}

string Reset::execute(vector<Task> & forUIDisplay, vector<Task> & store) {
	ofstream writeFile;
	writeFile.open(FILENAME_LOGGER.c_str(), ofstream::out | ofstream::app);
	writeFile << "Attempting to reset" << endl;
	writeFile.close();

	// clear currently displayed
	forUIDisplay.clear();
	assert(forUIDisplay.size() == NIL);

	//clear store
	store.clear();
	assert(store.size() == NIL);

	// clear txt
	Storage storage;
	vector<string> forTxtRewrite;
	forTxtRewrite.clear();
	storage.rewrite(forTxtRewrite);


	return RESETTED_FEEDBACK;
}